import React, {ReactNode} from 'react';
import {Drawer} from 'antd';


interface rightBoxType {
    open: boolean,
    children: ReactNode,
    title: string,
    onClose: () => void,
    className?: string,
    width?: string | number,
    placement?: 'top' | 'bottom' | 'left' | 'right'
}

export default function RightBox(props: rightBoxType) {
    const {
        width = '50%',
        placement = 'right',
        children
    } = props
    return (<>
            <Drawer
                placement={placement}
                width={width}
                {...props}
            >
                {children}
            </Drawer>
        </>
    );
};